import { param2Obj } from 'utils';

const clazzTreeData =  [
  {
    "id": 13,
    "type": 0,
    "children": [
      {
        "id": 5,
        "type": 1,
        "children": [
          {
            "id": 7,
            "type": 2,
            "parentId": 5,
            "children": [
              
            ],
            "icon": "group_fill",
            "title": "高三(1)班2",
            "label": "高三(1)班1"
          },
          {
            "id": 8,
            "parentId": 5,
            "children": [
              
            ],
            "icon": "fa-users",
            "title": "高三(2)班",
            "href": "/admin/groupType",
            "spread": false,
            "path": "/adminSys/baseManager/groupTypeManager",
            "code": "groupTypeManager",
            "label": "高三(2)班"
          },
          {
            "id": 21,
            "parentId": 5,
            "children": [
              
            ],
            "icon": "fa fa-book",
            "title": "高三(3)班",
            "href": "",
            "spread": false,
            "path": "/adminSys/baseManager/dictManager",
            "code": "dictManager",
            "label": "高三(3)班"
          },
          {
            "id": 27,
            "parentId": 5,
            "children": [
              
            ],
            "icon": "viewlist",
            "title": "高三(4)班",
            "href": "/admin/gateLog",
            "spread": false,
            "path": "/adminSys/baseManager/gateLogManager",
            "code": "gateLogManager",
            "label": "高三(4)班"
          }
        ],
        "icon": "setting",
        "title": "马鞍山一中",
        "href": "/admin",
        "spread": false,
        "path": "/adminSys/baseManager",
        "code": "baseManager",
        "label": "马鞍山一中"
      },
      {
        "id": 29,
        "parentId": 13,
        "children": [
          {
            "id": 30,
            "parentId": 29,
            "children": [
              
            ],
            "icon": "client",
            "title": "高一(1)班",
            "href": "/auth/service",
            "spread": false,
            "path": "/adminSys/authManager/serviceManager",
            "code": "serviceManager",
            "label": "高一(1)班"
          }
        ],
        "icon": "service",
        "title": "马鞍山二中",
        "href": "/auth",
        "spread": false,
        "path": "/adminSys/authManager",
        "code": "authManager",
        "label": "马鞍山二中"
      },
      {
        "id": 31,
        "parentId": 13,
        "children": [

        ],
        "icon": "service",
        "title": "马鞍山三中",
        "spread": false,
        "path": "/adminSys/monitorManager",
        "code": "monitorManager",
        "label": "马鞍山三中"
      },
      {
        "id": 38,
        "parentId": 13,
        "children": [
          {
            "id": 39,
            "parentId": 38,
            "children": [
              
            ],
            "icon": "fa-user",
            "title": "高二(5)班",
            "spread": false,
            "path": "/adminSys/schoolManager/schoolList",
            "code": "schoolListManager",
            "label": "高二(5)班"
          }
        ],
        "icon": "setting",
        "title": "马鞍山四中",
        "spread": false,
        "path": "/adminSys/schoolManager",
        "code": "schoolManager",
        "label": "马鞍山四中"
      },
      {
        "id": 40,
        "parentId": 13,
        "children": [
          {
            "id": 41,
            "parentId": 40,
            "children": [
              
            ],
            "icon": "fa-user",
            "title": "高二(10)班",
            "spread": false,
            "path": "/adminSys/personManager/personList",
            "code": "personList",
            "label": "高二(10)班"
          }
        ],
        "icon": "setting",
        "title": "马鞍山市第八中学",
        "spread": false,
        "path": "/adminSys/personManager",
        "code": "personManager",
        "label": "马鞍山市第八中学"
      }
    ],
    "icon": "setting",
    "title": "马鞍山市",
    "href": "/base",
    "spread": false,
    "path": "/adminSys",
    "code": "adminSys",
    "label": "马鞍山市"
  }
];

export default {
  getClazzTree: config => {
    return clazzTreeData;
  },
  getInfo: config => {
    const { token } = param2Obj(config.url);
    if (userMap[token]) {
      return userMap[token];
    } else {
      return Promise.reject('a');
    }
  },
  logout: () => 'success'
};
